package com.dingpeikeji.quickdeer.modules.orders.web;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.dingpeikeji.quickdeer.core.common.utils.CacheUtils;

@Controller
public class OrderStatusController {
	
	/**
	 * 订单支付状态
	 * @param orderid
	 * @return
	 */
	@RequestMapping("orderStatus")
	@ResponseBody
	public String orderStatus(String orderid){
		String status = (String) CacheUtils.get("feedback_order_id"+orderid);
		if(!StringUtils.isBlank(status) && status.equals("success")) {
			return "1";
		} else {
			return "0";
		}
	}
}
